package com.devilvan.betrice.poetry.po;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.devilvan.betrice.common.BasePo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.ToString;
import lombok.experimental.Accessors;
import org.hibernate.annotations.DynamicInsert;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EntityListeners;
import javax.persistence.Table;
import java.io.Serial;
import java.io.Serializable;

/**
 * @author Evad.Wu
 * @Description 古诗文网-关键字分类信息表 映射
 * @date 2022-11-29
 */
@Setter
@Getter
@ToString
@NoArgsConstructor
@Accessors(chain = true)
@TableName(value = "POETRY_KEYWORD")

@Entity
@Table(name = "POETRY_KEYWORD")
@DynamicInsert
@EntityListeners(AuditingEntityListener.class)
@Schema(description = "古诗文网-关键字分类信息表 映射")
public class PoetryKeywordPo extends BasePo implements Serializable {
    @Serial
    private static final long serialVersionUID = -711261130110019986L;
    @Schema(description = "关键字（类型、作者、朝代、形式）")
    @TableField(value = "KEYWORD")
    @Column(name = "KEYWORD", columnDefinition = "VARCHAR(32) NOT NULL COMMENT '关键字（类型、作者、朝代、形式）'")
    private String keyword;
    @Schema(description = "关键字子页面URL")
    @TableField(value = "KEYWORD_URL")
    @Column(name = "KEYWORD_URL", columnDefinition = "TEXT(65,535) NOT NULL COMMENT '关键字子页面URL'")
    private String keywordUrl;
    @Schema(description = "关键字子页面URL")
    @TableField(value = "IS_CRAWL")
    @Column(name = "IS_CRAWL", columnDefinition = "DEFAULT '0' COMMENT '是否采集到header'")
    private Boolean isCrawl;
}
